From 460e5345b70afc8212cf3e261f7bd294d2329754 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 14 Jul 2006 13:59:53 +0100 Subject: [PATCH] [HVM] fix system crash when vmx guest startx or restore Add this safety check like alloc_l4_table Signed-off-by: Edwin Zhai Signed-off-by: Xiaohui Xin --- xen/arch/x86/mm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index b2c95c1c9b..20a7e125cd 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -1008,6 +1008,10 @@ static int alloc_l3_table(struct page_info *page, unsigned long type) l3_pgentry_t *pl3e; int i; + /* See the code in shadow_promote() to understand why this is here. */ + if ( (PGT_base_page_table == PGT_l3_page_table) && + shadow_mode_refcounts(d) ) + return 1; ASSERT(!shadow_mode_refcounts(d)); #ifdef CONFIG_X86_PAE -- 2.30.2